licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
    name = "aws_kms_aead",
    srcs = ["AwsKmsAead.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "@maven//:com_amazonaws_aws_java_sdk_core",
        "@maven//:com_amazonaws_aws_java_sdk_kms",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "aws_kms_client",
    srcs = ["AwsKmsClient.java"],
    plugins = [":auto_service_plugin"],
    deps = [
        ":aws_kms_aead",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:kms_client",
        "//src/main/java/com/google/crypto/tink:kms_clients",
        "@maven//:com_amazonaws_aws_java_sdk_core",
        "@maven//:com_amazonaws_aws_java_sdk_kms",
        "@maven//:com_google_auto_service_auto_service_annotations",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "fake_aws_kms",
    testonly = 1,
    srcs = ["FakeAwsKms.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "@maven//:com_amazonaws_aws_java_sdk_core",
        "@maven//:com_amazonaws_aws_java_sdk_kms",
    ],
)

java_plugin(
    name = "auto_service_plugin",
    processor_class = "com.google.auto.service.processor.AutoServiceProcessor",
    deps = [
        "@maven//:com_google_auto_auto_common",
        "@maven//:com_google_auto_service_auto_service",
    ],
)
